<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
        <title></title>
        <script type='text/javascript'>

            var CTP_WEB_FULLPATH ='../../';

        </script>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Untitled Document</title>
        <script type="text/javascript" src="../../js-debug/jquery/jquery.js">
        </script>
        <script type="text/javascript" src="../../js-debug/jquery/jquery-migrate.js">
        </script>
        <script type="text/javascript" src="../../js-debug/jqueryui/jquery-ui.js">
        </script>
		<script type="text/javascript" src="../../js-debug/ctp/public/jsextend.js">
        </script>
        <script type="text/javascript" src="../../js-debug/ctp/public/ctp.core.js">
        </script>
		<script type='text/javascript' src='../../js-debug/ctp/public/ctp.base.js'></script>       
        <script type='text/javascript' src='../../js-debug/ctp/public/ctp.ui.component.js'></script>
        <script type="text/javascript" src="../../js-debug/ctp/ajaxtree/ctp.ui.ajaxtree.js">
        </script>
		<link href="../../css-debug/ajaxtree.css" rel="stylesheet" type="text/css"/>
        <script type="text/javascript" src="../../js-debug/ctp/panel/ctp.ui.panel.js">
        </script>
		<script type="text/javascript" src="../../js-debug/ctp/grid/jquery.jeditable_g.js"></script>
		<script type="text/javascript" src="../../js-debug/ctp/groupbox/ctp.ui.groupbox.js">
		</script>
		<script type="text/javascript" src="../../js-debug/ctp/gridlayout/ctp.ui.gridlayout.js">
        </script>	
		<script type="text/javascript" src="../../js-debug/ctp/button/ctp.ui.button.js">
        </script>
		<script type="text/javascript" src="../../js-debug/ctp/label/ctp.ui.label.js">
        </script>
        <script type='text/javascript' src='../../js-debug/ctp/synctree/ctp.ui.synctree.js'></script>  
		<script type="text/javascript" src="../../js-debug/ctp/button/ctp.ui.button.js"></script>
		<script type="text/javascript" src="../../js-debug/ctp/messagebox/ctp.ui.messagebox.js"></script>
		<script type="text/javascript" src="../../js-debug/ctp/data/ctp.data.js"></script>
        <link href="../../css-debug/panel.css" rel="stylesheet" type="text/css"/>
		<link href="../../css-debug/skins/standard/ctp-common.css" rel="stylesheet" type="text/css"/> 
		<link href="../../css-debug/button.css" rel="stylesheet" type="text/css"/>
		<link href="../../css-debug/groupbox.css" rel="stylesheet" type="text/css"/>
		<link href="../../css-debug/gridlayout.css" rel="stylesheet" type="text/css"/>
		<link href="../../css-debug/label.css" rel="stylesheet" type="text/css"/>
		<link href="../../css-debug/messagebox.css" rel="stylesheet" type="text/css"/>

        
        <script type='text/javascript' kind='variant'>
			//ctp.core.log.lvl=ctp.core.loglvl.obj;
            var panel35;
            var ajaxtree1;
            
        </script>
        <script type='text/javascript' kind='event'>

        </script>
        <script type='text/javascript' kind='ui'>

            $(window).load(function(){
			
			
			
				synctree = new ctp.ui.synctree({
					id: 'synctree',
					rootUrl: '../../jsdemo/synctree/root2.js',
					//targetAble: true,
					checkBox: '1',
					checkChange: function(data){
						alert(data.id);
					},
					onOpenClick: function(id){
						alert("isOpenClick,id=" + id);
					},
					onCloseClick: function(id){
						alert("isCloseClick,id=" + id); 
					},
					treeLine: true
					//checkSelfOnly:true,
					/*nodeOpenImg:'../../images/synctree/folderOpen.gif',//自定义打开和关闭的文件
		 			nodeCloseImg:'../../images/synctree/folderClosed.gif',
					 leafImg:'../../images/synctree/leaf.gif'*/
					//,nodeOpenImg: '../../images/synctree/of.bmp',
					//nodeCloseImg: '../../images/synctree/cf.bmp',
					//leafImg: '../../images/synctree/wenjian.bmp'
				});
				
				 var showLayout = new ctp.ui.gridlayout({
					id:'showLayout',
                    width: '98%',
                    cols: 2,
                    align: 'center',
                    colSpace: 30,
					items: [
							[{element: synctree}]]
                }); 
				button1 = new ctp.ui.button({
					id: 'button1',
					width: '150px',
					text: '所有checked的节点id',
					onClick: function(){
						alert(synctree.getAllChecked());
					}
				});
				button2 = new ctp.ui.button({
					id: 'button2',
					width: '150px',
					text: '点击ID为1的节点',
					onClick: function(){
						synctree.clickItem(1) 
					}
				});
				/*
	 //ajaxtree1.createDom();
	 var button7=new ctp.ui.button({
	 id: 'button7',
	 text: '设置当前所选全部节点的ID集合',
	 width: '100%',
	 onClick: function(){
	 //ctpMSB.alert({title:'多选框为选择状态的节点集合',message:ajaxtree1.getAllChecked()});
	 alert(ajaxtree1.getAllChecked());
	 }
	 });		
	 		
	 */
	
			var showGroupbox=new ctp.ui.groupbox({
			  	    id: 'showGroupbox',						
					items:[showLayout],
					title:'效果展示区'						   
			     });
				var buttonsLayout = new ctp.ui.gridlayout({
					id:'buttonsLayout',
                    width: '100%',
                    cols: 2,
                    align: 'center',
                    colSpace: 30,
                    items: [
					   [{element: button1},{element: button2}]
					
					]
                
                }); 
				var buttonsGroupbox=new ctp.ui.groupbox({
			  	    id: 'buttonsGroupbox',						
					items:[buttonsLayout],
					width:'100%',
					title:'功能测试区'						   
			     });
				var panel1 =new ctp.ui.panel({
					id:'panel1',
                    title: 'synctree实例',
                    collapsible: true,
                    width: '50%',
                    height: 'auto',
					align:'center',
					items:[showGroupbox,buttonsGroupbox],
                    renderTo: 'body'
                });        
				
				
				//ajaxtree1.setImageArrays("minus", "wj.bmp", "minus2.gif", "minus3.gif", "minus4.gif", "minus5.gif");
				//ajaxtree1.setImageArrays("plus", "bj.bmp", "plus2.gif", "plus3.gif", "plus4.gif", "plus5.gif");
				
			});


           
        </script>
    </head>
    <body>

    </body>
</html>
